import request from '@/utils/request'

export function page(params) {
  return request({
    url: 'ajax.group/index',
    method: 'get',
    params
  })
}


export function create(data){
  return request({
    url:'ajax.group/create',
    method:'post',
    data
  })
}

export function update(data){
  return request({
    url:'ajax.group/update',
    method:'post',
    data
  })
}

export function removeGroup(params){
  return request({
    url:'ajax.group/removeGroup',
    method:'get',
    params
  })
}

export function setState(data){
  return request({
    url:'ajax.group/setState',
    method:'post',
    data
  })
}

export function pagedevice(params){
  return request({
    url:'ajax.group/pageDevice',
    method:'get',
    params
  })
}

export function addDevice(data){
  return request({
    url:'ajax.group/addDevice',
    method:'post',
    data
  }) 
}

export function allDevices(params){
  return request({
    url:'ajax.group/allDevices',
    method:'get',
    params
  })
}

export function remove(params){
  return request({
    url:'ajax.group/remove',
    method:'get',
    params
  })
}